using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using XFGameFramework;

public class PlayerController : Controller
{
    PlayerModel playerModel;
    private GameSaveController gameSaveController => Module.LoadController<GameSaveController>();
    public PlayerModel GetPlayerModel()
    {
        playerModel = gameSaveController.GetPlayerModel(0);       
        return playerModel;
    }
    
    /// <summary>
    /// 重新引用,防止引用丢失
    /// </summary
    public void Reload()
    {
        playerModel = gameSaveController.GetPlayerModel(0);
    }

    #region 方法


    #endregion
    public override void OnInit()
    {
        base.OnInit();
        playerModel = gameSaveController.GetPlayerModel(0);
    }


    // public List<int> GetSkillList()
    // {
    //     Debug.Log("GetSkillList"+playerModel.skillsID);
    //     return playerModel.skillsID;
    // }
    // public List<int> GetSkillCd()
    // {
    //     return playerModel.skillsCD;
    // }
    // public void addskill(int skillid)
    // {
    //     playerModel.skillsID.Add(skillid);
    // }
    
  
}
